package com.btpj.blog_server.controller;

import com.btpj.blog_server.entity.BaseResp;
import com.btpj.blog_server.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@CrossOrigin
@RestController
public class LoginRegController {

    @Autowired
    UserService userService;

    @RequestMapping("/login_success")
    public BaseResp<Void> loginSuccess() {
        return new BaseResp<>(0, "登录成功！");
    }

    @RequestMapping("/login_error")
    public BaseResp<Void> loginError() {
        return new BaseResp<>(1, "登录失败！");
    }

    @RequestMapping("/login_page")
    public BaseResp<Void> loginPage() {
        return new BaseResp<>(2, "登录过期，请重新登录");
    }
}
